* {
            box-sizing: border-box;
            font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
            margin: 0;
            padding: 0;
        }
        body {
            min-height: 100vh;
            background: linear-gradient(145deg, #f6f9fc 0%, #eef2f7 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }
        .card {
            max-width: 1100px;
            width: 100%;
            background: rgba(255,255,255,0.8);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-radius: 2.5rem;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.8);
            padding: 2rem 2rem 2.5rem;
            border: 1px solid rgba(255,255,255,0.5);
        }
        h1 {
            font-weight: 600;
            font-size: 2.2rem;
            letter-spacing: -0.01em;
            background: linear-gradient(135deg, #1e293b, #2d3c53);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin-bottom: 0.3rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .badge {
            background: #0b2b26;
            color: #9cf5e3;
            font-size: 0.85rem;
            font-weight: 500;
            padding: 0.3rem 1rem;
            border-radius: 40px;
            margin-left: 1rem;
            border: 1px solid #3b9b8a;
        }
        .sub {
            color: #2c3e50;
            margin-bottom: 2rem;
            font-size: 1rem;
            border-left: 4px solid #2aa385;
            padding-left: 1.2rem;
            background: #ffffffb0;
            border-radius: 0 12px 12px 0;
            width: fit-content;
            backdrop-filter: blur(4px);
        }
        .upload-section {
            background: #ffffffd6;
            border-radius: 2rem;
            padding: 1.8rem 2rem;
            box-shadow: inset 0 2px 8px rgba(0,0,0,0.03), 0 8px 18px rgba(0,30,20,0.1);
            border: 1px solid white;
            margin-bottom: 2rem;
        }
        .file-area {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 2rem;
        }
        .file-label {
            background: #1e2b39;
            color: white;
            font-weight: 600;
            padding: 0.9rem 2.2rem;
            border-radius: 60px;
            cursor: pointer;
            transition: 0.2s;
            box-shadow: 0 6px 14px rgba(0,40,30,0.25);
            display: inline-flex;
            align-items: center;
            gap: 12px;
            border: 1px solid #62778b;
        }
        .file-label:hover {
            background: #0f1a24;
            transform: scale(1.02);
        }
        .file-info {
            font-size: 1rem;
            color: #174339;
            background: #e4f3ef;
            padding: 0.5rem 1.2rem;
            border-radius: 40px;
            font-weight: 500;
        }
        #fileSizeWarning {
            color: #b02b2b;
            font-weight: 600;
            background: #ffd9d9;
            padding: 0.3rem 1.2rem;
            border-radius: 30px;
            font-size: 0.9rem;
        }
        .main-panel {
            display: grid;
            grid-template-columns: 1.1fr 0.9fr;
            gap: 2rem;
            margin-bottom: 2.2rem;
        }
        .preview-box {
            background: #cbd5e1;
            border-radius: 2rem;
            overflow: hidden;
            aspect-ratio: 1 / 1;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 12px 25px -8px rgba(0,20,10,0.4);
            border: 3px solid white;
            position: relative;
            background-image: 
                linear-gradient(45deg, #aaa 25%, transparent 25%),
                linear-gradient(-45deg, #aaa 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #aaa 75%),
                linear-gradient(-45deg, transparent 75%, #aaa 75%);
            background-size: 30px 30px;
            background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
            background-color: #ddd;
        }
        .preview-box canvas {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
        }
        .controls {
            background: #ffffffed;
            border-radius: 2rem;
            padding: 1.8rem 1.8rem;
            backdrop-filter: blur(4px);
            box-shadow: 0 10px 20px rgba(0,20,0,0.1);
            border: 1px solid white;
        }
        .slider-group, .color-group {
            margin-bottom: 2rem;
        }
        .slider-group label, .color-group label {
            font-weight: 600;
            color: #153b34;
            display: flex;
            justify-content: space-between;
        }
        input[type=range] {
            width: 100%;
            margin: 0.5rem 0;
            height: 8px;
            background: #cbd5e1;
            border-radius: 10px;
            -webkit-appearance: none;
        }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 22px;
            height: 22px;
            background: #1f4d3d;
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid white;
            box-shadow: 0 2px 8px black;
        }
        input[type=color] {
            width: 100%;
            height: 48px;
            border: 2px solid #a0bfb5;
            border-radius: 40px;
            padding: 0.2rem;
            background: white;
            cursor: pointer;
            margin-top: 0.4rem;
        }
        .action-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-top: 2rem;
        }
        .btn {
            border: none;
            background: white;
            font-weight: 700;
            padding: 1rem 2rem;
            border-radius: 60px;
            font-size: 1rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            cursor: pointer;
            box-shadow: 0 8px 16px rgba(0,30,0,0.15);
            transition: 0.15s;
            flex: 1 1 auto;
            border: 1px solid #ffffff;
        }
        .btn-primary {
            background: #1f3f37;
            color: white;
            border: 1px solid #64b6a3;
        }
        .btn-primary:hover {
            background: #14322b;
            transform: translateY(-3px);
        }
        .btn-download {
            background: #0e2e2e;
            color: #cbf3ed;
            border: 1px solid #46cfb6;
        }
        .btn-download:disabled {
            opacity: 0.4;
            pointer-events: none;
            filter: grayscale(0.6);
        }
        .btn:active {
            transform: translateY(2px);
            box-shadow: 0 2px 6px black;
        }
        #status {
            margin-top: 1.8rem;
            font-weight: 600;
            background: #0000001a;
            border-radius: 50px;
            padding: 0.7rem 1.5rem;
            text-align: center;
            color: #0b423a;
            transition: 0.2s;
            border-left: 5px solid #26997b;
        }
        hr {
            border: none;
            height: 2px;
            background: linear-gradient(to right, #8fbcb3, transparent);
            margin: 1.2rem 0;
        }
        .footer-note {
            text-align: center;
            font-size: 0.85rem;
            color: #324e47;
            margin-top: 1.8rem;
        }
        .footer-note code {
            background: #243b35;
            color: #bff7e9;
            padding: 0.2rem 0.7rem;
            border-radius: 20px;
        }